package com.ruoyi.myplayer.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.myplayer.domain.AreaBean;
import com.ruoyi.myplayer.domain.HomeBean;
import com.ruoyi.myplayer.domain.VideoBean;
import com.ruoyi.myplayer.domain.VideoBean2;
import com.ruoyi.myplayer.service.AreaService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

import static com.ruoyi.common.utils.PageUtils.startPage;

/**
 * @author lvyq
 * @version 1.0
 * Create by 2025-02-25 16:16
 */
@RestController
@RequestMapping("/myplayer/mv")
public class PlayerMvController extends BaseController {

    @Resource
    private  AreaService areaService;

    @GetMapping("/areaLst")
    public TableDataInfo areaLst()
    {
        startPage();
        List<AreaBean> list = areaService.list();
        return getDataTable(list);
    }

    @GetMapping("/list")
    public TableDataInfo list(VideoBean bean)
    {
        startPage();
        List<VideoBean> list = areaService.list(bean);
        return getDataTable(list);
    }

    @GetMapping("/list2")
    public TableDataInfo list2(VideoBean2 bean)
    {
        startPage();
        List<VideoBean2> list = areaService.list2(bean);
        return getDataTable(list);
    }
}
